<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class CI_TemplateBuilder   {
     
    var $instance;
    var $admin_css_path;
    var $js_path;
    
    public function __construct()
    {
        $this->instance =  get_instance();
        $this->admin_css_path = base_url().'styles/admin/css/';
        $this->js_path = base_url().'javascript/';
    }	
    
    public function admin_template_builder( $view , $data= '' )
    {               
        $data_header['title'] = 'Administration';
        $data_header['css_path'] = $this->admin_css_path;
        $data_header['js_path'] = $this->js_path;
        
        $this->instance->load->view('admin/templates/header', $data_header);
        $this->instance->load->view('admin/'. $view, $data);
        $this->instance->load->view('admin/templates/footer');
    }        
    
}

?>